﻿
Public Module share
    Public stdi As fifoMemoryStream = Nothing
    Public stdout As fifoMemoryStream = Nothing
    Public stderr As fifoMemoryStream = Nothing

    Sub New()
        stdi = New fifoMemoryStream()
        stdout = New fifoMemoryStream()
        stderr = New fifoMemoryStream()
    End Sub

    Public Function readstdi(ByVal buff() As Byte, ByVal count As Int64) As Int64
        Return readstream(stdi, buff, length:=count, retrytimes:=maxInt32, holdtime:=maxInt64)
    End Function
End Module
